package com.jubaozan.framework.sentinel.springmvc.listener;

import com.alibaba.csp.sentinel.cluster.server.config.ClusterServerConfigManager;
import com.alibaba.csp.sentinel.cluster.server.config.ServerTransportConfig;
import com.alibaba.csp.sentinel.slots.block.degrade.DegradeRuleManager;
import com.jubaozan.framework.sentinel.listener.AbstractRulePropertyListener;
import java.util.List;
import lombok.RequiredArgsConstructor;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @author jiangjinwu
 * @version 1.0
 * @since 2025/7/19 16:07
 */

@Slf4j
@Component
public class ServerTransportConfigListener extends AbstractRulePropertyListener<ServerTransportConfig> {

    public ServerTransportConfigListener() {
        super(ServerTransportConfig.class);
    }

    @Override
    protected void doLoad(List<ServerTransportConfig> conf) {
        log.info("接收到服务端配置加载: {}", conf);
    }

    @Override
    protected String getRedisKey() {
        return ruleKeyConstant.getServerTransportConfigKey();
    }
}
